<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>许愿墙首页</title>
	<link rel="stylesheet" href="<?php echo __PUBLIC__ ?>/images/style.css" />
	<script type="text/javascript" src="<?php echo __PUBLIC__ ?>/JS/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="<?php echo __PUBLIC__ ?>/JS/xhr.js"></script>
		<script type="text/javascript" src="<?php echo __PUBLIC__ ?>/JS/drag-moreClass.js"></script>
		<script type="text/javascript" src="<?php echo __PUBLIC__ ?>/JS/index.js"></script>
	<script type="text/javascript">
		//解析php 定义js网址
	var APP = "<?php echo __APP__ ?>";
	var PUBLIC = "<?php echo __PUBLIC__ ?>";
	</script>
</head>
<body>

<div id="web_bg" style="position:absolute; width:100%; height:100%; z-index:-1">
<img style="position:fixed;" src="<?php echo __PUBLIC__ ?>/images/bg.jpg" height="100%" width="100%" />
</div>
<?php $page = (!empty($_GET['page'])) ? $_GET['page']: 0; ?> <!-- 获取页码 -->
<?php $lengths = count($data) ?> <!-- 获取总条数 -->
<?php $everypagenum = 5 ?> <!-- 设置每页显示条数 -->
<?php $starNum =  $page* $everypagenum ?>
<div id="content">
<?php  for ($x=$starNum; $x<=$starNum+$everypagenum; $x++) {  ?>
<?php 
$data[$x]['content'] = isset($data[$x]['content'])?$data[$x]['content']:'内容丢失了~';
$data[$x]['user'] = isset($data[$x]['user'])?$data[$x]['user']:'losted~';
$data[$x]['time'] = isset($data[$x]['time'])?$data[$x]['time']:'向前看把，后边没了~';
?>
<div class="cont cont1"><ul><li class="content">【编号:0000 <?php echo $x ?>】<br/><?php echo  $data[$x]['content'] ?></li><li class="poster">——发布人：<?php echo  $data[$x]['user']  ?></li><li class="time"><?php echo  $data[$x]['time']  ?></li></ul></div>
	<?php }  ?>



<div id="post">	
<div class="close"></div>
<form action="javascript:;">
	<ul>
			<ul><li class="center">发布愿望</li><ul>
			<ul><li class="tit">昵称：</li><li><input type="text" class="postH input" name="user" value="" /><span></span></li></ul>
			<ul><li class="tit conhight">愿望：</li><li class="conhight"><textarea  rows="5" cols="20" class="content input" name="content" ></textarea><span></span></li></ul>
			<input type="hidden" name="time" value="<?php echo date('Y/m/d h:i:s') ?>"/>
			<ul><li class="tit">验证码：</li><li><input type="text" class="postH code input" name='code' value="" /><img class ='refreshCode' src="<?php echo __APP__ ?>?c=Index&a=code" alt="验证码：" /><span></span></li></ul>
			<ul><li><input type="submit" value="发布愿望"  class="btn input" /></li></ul>
	
	</ul>
</form>
</div>
<div class="wish">
</div>
<div class="start"></div>
<div class="page"><li class="last"><a href="javascript:;"><<</a></li><li><a href="index.php?page=1">1</a><li><a href="./index.php?page=2">2</a></li><li><a href="index.php?page=3">3</a></li><li><a href="index.php?page=4">4</a></li></li><li><a href="index.php?page=5">5</a><li class="next"><a href="javascript:;">>></a></li><li class="count">总条数：<span><?php echo count($data) ?></span></li></div>
</div>
</body>
</html>
